package com.youbar.client.enums;

/**
 * 回调状态
 */
public enum ResultCode {

    SUCCESS(1000,"操作成功",true),
    FALSE(1001,"操作失败",false),

    //1注册相关
    NOT_SAME(1002,"两次密码输入不相同", false),
    SAME_NICK(1003,"用户昵称已存在", false),
    NO_INVITATION_CODE(1004,"无该邀请码", false),

    //2 登录相关
    USER_NOT_EXIST(2001,"用户不存在", false),
    USER_HAVE_EXIST(2002,"用户已存在", false),
    USER_FREEZE(2003,"用户被冻结，请联系客服！", false),
    USER_PASS_ERROR(2004,"密码不正确", false),
    USER_LOGIN_FAIL(2005,"登陆失败", false),
    USER_TOKEN_UNUSUAL(2006,"token异常", false),

    //5 内部错误相关
    UN_VAILD_PARA(5000,"上传参数不正确",false),
    ERROR(5001,"服务器内部异常，请重试",false),
    UPDATE_ERROR(5002,"数据更新失败",false),
    NO_INFO(5003, "暂无数据",false),
    FREQUENTLY(5004,"接口请求太过频繁，请重试",false),
    GET_YZM_ERROR(5005,"验证码请求失败",false),
    CODE_VALID_ERROR(5006,"验证码校验失败",false),
    SIGN_ERROR(5007,"签名错误",false),
    YZM_VALID_EMPTY(5008,"请重新获取验证码",false);

    private Integer code;
    private String message;
    private boolean success;

    ResultCode(Integer code, String message, boolean success) {
        this.code = code;
        this.message = message;
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
